From e27031599c808758d26e5379f3a3410d176483aa Mon Sep 17 00:00:00 2001 From: oliskoli Date: Mon, 19 Dec 2005 22:11:52 +0000 Subject: [PATCH] Added gpsbabel startup-time (freezed and unfreezed) to global variables. --- gpsbabel/defs.h | 2 ++ gpsbabel/globals.c | 3 ++- gpsbabel/main.c | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gpsbabel/defs.h b/gpsbabel/defs.h index 9bea4dfcc..2e4fa2e5a 100644 --- a/gpsbabel/defs.h +++ b/gpsbabel/defs.h @@ -120,6 +120,8 @@ typedef struct { extern global_options global_opts; extern const char gpsbabel_version[]; +extern time_t gpsbabel_now; /* gpsbabel startup-time; initialized in main.c with time() */ +extern time_t gpsbabel_time; /* gpsbabel startup-time; initialized in main.c with current_time(), ! ZERO within testo ! */ /* Short or Long XML Times */ #define XML_SHORT_TIME 1 diff --git a/gpsbabel/globals.c b/gpsbabel/globals.c index efbb789fa..72e343d3a 100644 --- a/gpsbabel/globals.c +++ b/gpsbabel/globals.c @@ -24,5 +24,6 @@ global_options global_opts; const char gpsbabel_version[] = VERSION; - +time_t gpsbabel_now; /* gpsbabel startup-time; initialized in main.c with time() */ +time_t gpsbabel_time; /* gpsbabel startup-time; initialized in main.c with current_time(), ! ZERO within testo ! */ diff --git a/gpsbabel/main.c b/gpsbabel/main.c index c0e79533f..a95b0d056 100644 --- a/gpsbabel/main.c +++ b/gpsbabel/main.c @@ -103,6 +103,9 @@ main(int argc, char *argv[]) global_opts.charset = NULL; /* #ifdef UTF8_SUPPORT */ global_opts.charset_name = NULL; /* #ifdef UTF8_SUPPORT */ + gpsbabel_now = time(NULL); /* gpsbabel startup-time */ + gpsbabel_time = current_time(); /* same like gpsbabel_now, but freezed to zero during testo */ + #ifdef DEBUG_MEM debug_mem_open(); debug_mem_output( "command line: " ); -- 2.30.2